/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package com.plian.system.service.lg;

import com.plian.Tools.pagedata.PageData;
import com.plian.system.dto.lg.LawDisputeSummaryDTO;
import com.plian.system.entity.lg.LawDisputeSummary;
import com.plian.system.mybatis.base.BaseService;
import com.plian.system.vo.report.ReportReturnVO;
import org.apache.ibatis.annotations.Param;

import java.io.File;
import java.util.List;

/**
 * 服务类
 *
 * @author gangan
 * @since 2019-09-27
 */
public interface ILawDisputeSummaryService extends BaseService<LawDisputeSummary> {


	/**
	 * 判断编码是否重复
	 *
	 * @param id
	 * @param code
	 * @return
	 */
	Boolean checkIsExisted(Long id, @Param("code") String code);

	/** TODO DEL
	 * 企业法律纠纷案件情况汇总表
	 * @param lawDisputeDTO
	 * @return
	 */
	ReportReturnVO lawDisputeSummary(LawDisputeSummaryDTO lawDisputeDTO);
//
//	/**
//	 * 企业法律纠纷案件情况汇总表
//	 * @param lawDisputeDTO
//	 * @return
//	 */
//	ReportReturnVO unclosedCasesSummary(LawDisputeSummaryDTO lawDisputeDTO);
//
	/**
	 * 根据id打印
	 * @param id
	 * @return
	 */
	File buildpdf(Long id);

	/**
	 * 每个季度只能填写一次
	 * @param id
	 * @param year
	 * @param quarter
	 * @param unitId
	 * @return
	 */
	Boolean checkTimeSpan(Long id, String year, String quarter, String unitId);

	/**
	 *
	 * @param formIds
	 * @return
	 */
	List<PageData> findByIds(List<String> formIds);

    void goBackToStash(String formId);

	/**
	 * 同步更新到法律纠纷汇总
	 * @param lawDisputeSummary
	 * @return
	 */
	boolean insertOrUpdate(LawDisputeSummary lawDisputeSummary);
}
